﻿<Window x:Class="biolit_config.SettingsDialog" Name="settingsDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" WindowStartupLocation="CenterScreen"
    MinHeight="300" MinWidth="400" Width="600" Height="550"  Title="Ontology Add-in Configuration" ResizeMode="NoResize">
        <DockPanel VerticalAlignment="Stretch" Height="500" Grid.Row="0" Grid.Column="0">
            <StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" VerticalAlignment="Stretch" Height="34" >
            <StackPanel HorizontalAlignment="Right" VerticalAlignment="Stretch" Orientation="Horizontal">
                    <Button Margin="5,5,5,5" Name="OkaySettingsButton" Click="OkaySettingsButton_Click" Width="50" Height="Auto" Cursor="Hand">OK</Button>
                    <Button Margin="5,5,5,5" IsCancel="True" IsDefault="True" Width="50" Height="Auto" Cursor="Hand">Cancel</Button>
                </StackPanel>
            </StackPanel>
        <TabControl Margin="0,0,0,0" Name="tabControl1" Loaded="OntologyTabLoad" VerticalContentAlignment="Stretch">
                <TabItem Header="Ontology" Name="ontologySelectionTI">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="240" />
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition Width="240" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />                           
                            <RowDefinition Height="400" />
                    </Grid.RowDefinitions>
                        <TextBlock TextWrapping="Wrap" Margin="5" Name="textBlock1" Grid.Row="0" Grid.ColumnSpan="3">Select Ontologies from the list on the left and add them to the list of Ontologies to be downloaded and used on your computer</TextBlock>
                        <!-- use a DockPanel to avoid having the ListBox clipped as it grows in length -->
                        <StackPanel Grid.Row="1" Grid.Column="0">
                            <TextBlock  Margin="5,5,5,5" DockPanel.Dock="Top" HorizontalAlignment="Left" Text="Download Locations" ></TextBlock>
                            <!-- Element for selecting downloading URL -->
                        <StackPanel Orientation="Horizontal">
                            <ComboBox Name="OntologyLocations" Height="25" Width="200" HorizontalAlignment="Left" SelectionChanged="OntologyLocations_SelectionChanged">
                                <!--ComboBoxItem Name="AddNewItem"   Selected="AddNewItem_Selected" FontStyle="Italic" Content="Add new download location"></ComboBoxItem>
                                <ComboBoxItem Name="LoadOntologyFile"   Selected="DownloadOntologyFile_Selected" FontStyle="Italic">Download Ontology file (*.obo)</ComboBoxItem>-->
                            </ComboBox>
                            <Button Name="btnDownloadLocation" Cursor="Hand"  Height="25" Width="25" Margin="10 0 0 0" HorizontalAlignment="Center"  Content="+" Click="btnDownloadLocation_Click"></Button>
                        </StackPanel>
                             <TextBlock  Margin="5,5,5,5" HorizontalAlignment="Center">Available Ontologies</TextBlock>
                            <ListBox Name="AvailableOntologies"  MouseDoubleClick="AvailableOntologies_MouseDoubleClick" ScrollViewer.HorizontalScrollBarVisibility="Visible"  ScrollViewer.VerticalScrollBarVisibility="Visible"  ScrollViewer.CanContentScroll="True" Height="265"  />
                       
                    </StackPanel>
                    <!-- use a StackPanel so that this ListBox is aligned to the top -->
                    <StackPanel Grid.Row="1" Grid.Column="2">
                        <StackPanel Orientation="Horizontal" Margin="0 25 0 0">
                            <Border BorderBrush="#FFC1C1C1" BorderThickness="1" Height="28">
                            <TextBlock Height="Auto"  Margin="5,5,5,5"  HorizontalAlignment="Center" VerticalAlignment="Center" Text="Local Ontology Files [ .obo ]" Width="180"  ></TextBlock>
                                </Border>
                            <Button Click="LoadOntologyFile_Selected" Cursor="Hand" Width="Auto" Height="25" HorizontalAlignment="Center" Margin="10 0 0 0">Load</Button>
                        </StackPanel>
                        
                        
                            <TextBlock Margin="5,5,5,5" HorizontalAlignment="Center">Selected Ontologies</TextBlock>
                            <ListBox Name="SelectedOntologies" Height="265" Margin="0 0 0 0" ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" />
                        
                        </StackPanel>
                        <StackPanel Grid.Row="1" Grid.Column="1"  VerticalAlignment="Center">
                            <Button Margin="5,5,5,5" Name="AddOntology" Click="AddOntology_Click" Content="&gt;" Height="Auto" Width="Auto" FontSize="16" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" Cursor="Hand"></Button>
                        <Button Margin="5,5,5,5" Name="RemoveOntology" Click="RemoveOntology_Click" Content="&lt;" Height="Auto" Width="Auto" FontSize="16" FontWeight="Bold" Cursor="Hand" />
                        </StackPanel>

                    
                </Grid>
                    
                </TabItem>
                <TabItem Header="Database" Name="databaseTI">
                    <StackPanel Width="Auto"  Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 10 0 0">
                        <CheckBox Margin="5,5,5,5" Height="20" Name="NCBITB" Width="Auto" ToolTip="National Center for Biotechnology Information">NCBI</CheckBox>
                        <CheckBox Margin="5,5,5,5" Height="20" Name="PDBTB" Width="Auto" ToolTip="Protein Data Bank">PDB</CheckBox>
                        <CheckBox Margin="5,5,5,5" Height="20" Name="IDTB" Width="Auto" ToolTip="UniProtKB">UniProtKB</CheckBox>
                        <TextBlock Margin="5,5,5,5" >
                            <Hyperlink Name="SuggestionURL" Click="Navigate_OnClick" NavigateUri="http://ucsdbiolit.codeplex.com/Thread/View.aspx?ThreadId=44839">
                                <TextBlock>Suggestions for additional databases</TextBlock>
                            </Hyperlink>    
                        </TextBlock>
                </StackPanel>
                </TabItem>
                <TabItem Header="Settings" Name="settingsTI">
                    <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" Width="Auto" Margin="0 10 0 0">
                        <CheckBox Margin="5,5,5,5" Height="Auto" Name="alwaysRunCB" ToolTip="The Add-in will automatically start when Word is launched">Turn on Add-in when Word starts</CheckBox>
                        <!--<CheckBox Margin="5,5,5,5" Height="Auto" Name="matchingInlineCB" ToolTip="Performs Term Matching Inline">Perform term matching inline</CheckBox>-->
                        <CheckBox Margin="5,5,5,5" Height="Auto" Name="workOfflineCB" ToolTip="Work Offline">Always work offline</CheckBox>
                        <!--<CheckBox Margin="5,5,5,5" Height="Auto" Name="ignoreTermsCB" ToolTip="Ignore Terms in the List">Ignore terms in list</CheckBox>-->
                    </StackPanel>
                </TabItem>
        </TabControl>
    </DockPanel>
</Window>
